package edu.sctu.xiangkun.day201506.day20150603.TextFour;

/**
 * Created by lenovo on 2015/6/3.
 */
public class Demo extends Thread{
    private String name;

    public Demo(String name) throws InterruptedException {
        this.name = name;
    }
    public void run(){
        if (name.length() >= 3){
            System.out.println("name:"+name);
        }
    }
    public void sleep(){
        try{
            sleep((int)(10000*Math.random()));
        }catch(InterruptedException e){
            e.printStackTrace();
        }
    }


}
